package com.zego.wawaji.ui.wawa.synth;

import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.zego.wawaji.R;
import com.zego.wawaji.base.bean.Common;
import com.zego.wawaji.base.module.ModuleMgr;
import com.zego.wawaji.ui.dialog.popup.BottomPopup;

/**
 * 玩法介绍说明弹框
 * Created by Su on 2018/3/4.
 */
public class SynthExplainDialog extends BottomPopup {

    public SynthExplainDialog(FragmentActivity activity) {
        super(activity);
        setCancelableOutTouch(true);
    }

    @Override
    protected View makeContentView() {
        View inflate = LayoutInflater.from(activity).inflate(R.layout.synth_explain_dialog, null);

        TextView title = (TextView) inflate.findViewById(R.id.synth_title);
        TextView content = (TextView) inflate.findViewById(R.id.synth_content);
        inflate.findViewById(R.id.de_cancel).setOnClickListener(v -> dismiss());

        Common common = ModuleMgr.getWawaMgr().getCommon();
        title.setText(common.getComposeTitle());
        content.setText(common.getComposeContent());
        return inflate;
    }
}